#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.setup.module.code.service;

import ${package}.common.bean.po.Code;
import ${package}.common.bean.po.CodeType;
import ${package}.common.bean.vo.AddCodeTypeVo;
import ${package}.common.bean.vo.CodeApiVo;
import ${package}.common.bean.vo.CodeMoveVo;
import ${package}.common.bean.vo.CodeTypeVo;
import ${package}.common.bean.vo.CodeVo;
import ${package}.common.bean.vo.InsertCodeVo;
import ${package}.common.bean.vo.QueryBean;
import ${package}.common.bean.vo.UpdateCodeTypeVo;
import ${package}.common.bean.vo.UpdateCodeVo;
import ${package}.common.bean.vo.UploadCodeVo;
import ${package}.setup.utils.SourceCodeUtil;
import com.github.pagehelper.PageInfo;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;

import java.io.File;
import java.util.List;

/**
 * Description: CodeService 接口
 *
 * @author wenxiaopeng
 * @date 2020/07/24 13:54
 *
 * <pre>
 *              ${copyright}
 *      Copyright (c) 2019. All Rights Reserved.
 * </pre>
 */
public interface CodeService {

	/**
	 * Description:
	 * <修改代码类型状态>
	 * @param id   1
	 * @author wenxiaopeng
	 * @date 17:21 2020/07/26
	 **/
	void changeCodeTypeStatus(Long id);

	/**
	 * Description:
	 * <单插入一个代码>
	 *
	 * @param codeVo 1
	 * @return ${package}.corplution.bean.po.Code
	 * @author wenxiaopeng
	 * @date
	 **/
	Code insertCode(InsertCodeVo codeVo);

	/**
	 * Description:
	 * <仅适用批量直接插入code，例如导入code excel>
	 *
	 * @param codes      code列表
	 * @return void
	 * @author wenxiaopeng
	 * @date
	 **/
	CodeTypeVo batchInsertCode(List<Code> codes);

	/**
	 * Description:
	 * <下载所选的代码检索项的所有代码组合>
	 * @author zhoutt
	 * @date 21:10 2020/9/1
	 * @param codeType 1
	 * @return org.apache.poi.xssf.usermodel.XSSFWorkbook
	 **/
	XSSFWorkbook downloadCode(Long codeType);

	/**
	 * Description:
	 * <修改修订版本代码值>
	 * @param codeVo 1
	 * @author wenxiaopeng
	 * @date 10:38 2020/09/07
	 * @return ${package}.corplution.bean.po.Code
	 **/

	Code updateCode(UpdateCodeVo codeVo);

	/**
	 * Description:
	 * <更新代码类型描述>
	 * @param codeVo 1
	 * @author wenxiaopeng
	 * @date 10:49 2020/09/07
	 * @return ${package}.corplution.bean.po.CodeType
	 **/
	CodeType updateCodeType(UpdateCodeTypeVo codeVo);


	/**
	 * Description:
	 * <代码值维护可拖动排序>
	 * @author zhoutt
	 * @date 11:38 2020/10/27
	 * @param codeMoveVo 1
	 **/
    void moveCode(CodeMoveVo codeMoveVo);

    /**
     * Description:
     * <新增代码类型>
     * @param codeType 1
     * @author wenxiaopeng
     * @date 14:20 2021/06/17
     * @return ${package}.common.bean.po.CodeType
     **/
	CodeType addCodeType(AddCodeTypeVo codeType);

	/**
	 * Description:
	 * <分页查询CodeType列表>
	 * @param  queryBean 查询条件
	 * @author wenxiaopeng
	 * @date 14:27 2021/06/17
	 * @return com.github.pagehelper.PageInfo<${package}.common.bean.po.CodeType>
	 **/
	PageInfo<CodeType> getCodeTypeLimits(QueryBean queryBean);

	/**
	 * Description:
	 * <查询指定代码列表>
	 * @param codeType  代码类型（全匹配）
	 * @param code      指定代码值（某层的某个）
	 * @param lazy      是否全量加载（从当前层开始）
	 * @author wenxiaopeng
	 * @date 15:10 2021/06/17
	 * @return java.util.List<${package}.common.bean.vo.CodeVo>
	 **/
	List<CodeApiVo> getCodes(String codeType, String code, boolean lazy);

	/**
	 * Description:
	 * <修改代码状态>
	 * @param id 1
	 * @author wenxiaopeng
	 * @date 18:02 2021/06/17
	 **/
	void changeCodeStatus(Long id);

	/**
	 * Description:
	 * <生成代码文件>
	 * @param codeTypeId 1
	 * @param style 2
	 * @author wenxiaopeng
	 * @date 13:02 2021/06/21
	 * @return java.io.File
	 **/
	File generateSourceCode(Long codeTypeId, SourceCodeUtil.CodeStyle style);

	/**
	 * Description:
	 * <获取codeType详情>
	 * @param codeTypeId 1
	 * @author wenxiaopeng
	 * @date 14:46 2021/06/21
	 * @return ${package}.common.bean.vo.CodeTypeVo
	 **/
	CodeTypeVo getCodeTypeDetail(Long codeTypeId);

	/**
	 * Description:
	 * <批量上传code>
	 * @param codeVo 1
	 * @author wenxiaopeng
	 * @date 14:56 2021/06/21
	 * @return ${package}.common.bean.vo.CodeTypeVo
	 **/
	CodeTypeVo handleImport(UploadCodeVo codeVo);

	/**
	 * Description:
	 * <通过code获取代码详情>
	 * @param code 1
	 * @author wenxiaopeng
	 * @date 09:37 2021/06/22
	 * @return ${package}.common.bean.vo.CodeVo
	 **/
	CodeApiVo getCodeDetail(String code);

	/**
	 * Description:
	 * <通过id获取代码详情>
	 * @param id 1
	 * @author wenxiaopeng
	 * @date 09:46 2021/06/22
	 * @return ${package}.common.bean.vo.CodeVo
	 **/
	CodeVo getCodeDetail(Long id);

	/**
	 * Description:
	 * <获取代码类型列表>
	 * @author wenxiaopeng
	 * @date 10:07 2021/06/22
	 * @return java.util.List<${package}.common.bean.vo.CodeTypeVo>
	 **/
	List<CodeType> getCodeTypeList();
}
